#include <stdio.h>
int main(int argc, char const *argv[]) {
    int a, *p;  //定义指针变量
    a = 5;
    p = &a; //指针变量p指向a   
    printf("a=%d,*p=%d\n", a, *p); //直接访问和间接访问
    printf("&a=%d,p=%d\n", &a, p); //指针和地址
    printf("&a=%x,p=%x\n", &a, p); //十六进制显示指针和地址
    *p = 10;
    printf("a=%d,*p=%d\n", a, *p); //直接访问和间接访问
    return 0;
}
